home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Graphics 3D / SetupGL / Error Handler.h < prev    next >
Encoding:
Text File  |  2000-09-28  |  3.8 KB  |  97 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        Error Handler.h
  3.  
  4.     Contains:    Functions to enable build and destory a GL fullscreen context
  5.  
  6.     Written by:    Geoff Stahl (ggs)
  7.  
  8.     Copyright:    Copyright © 1999 Apple Computer, Inc., All Rights Reserved
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <3>     1/24/00    ggs     added C++ support
  13.          <2>    12/18/99    ggs     Fix headers
  14.          <1>    11/28/99    ggs     Initial add.  Split of just error handling functions.  Need to
  15.                                     add more reporting examples
  16.          <1>    11/11/99    ggs     Initial Add
  17.  
  18.     Disclaimer:    IMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.
  19.                 ("Apple") in consideration of your agreement to the following terms, and your
  20.                 use, installation, modification or redistribution of this Apple software
  21.                 constitutes acceptance of these terms.  If you do not agree with these terms,
  22.                 please do not use, install, modify or redistribute this Apple software.
  23.  
  24.                 In consideration of your agreement to abide by the following terms, and subject
  25.                 to these terms, Apple grants you a personal, non-exclusive license, under Apple’s
  26.                 copyrights in this original Apple software (the "Apple Software"), to use,
  27.                 reproduce, modify and redistribute the Apple Software, with or without
  28.                 modifications, in source and/or binary forms; provided that if you redistribute
  29.                 the Apple Software in its entirety and without modifications, you must retain
  30.                 this notice and the following text and disclaimers in all such redistributions of
  31.                 the Apple Software.  Neither the name, trademarks, service marks or logos of
  32.                 Apple Computer, Inc. may be used to endorse or promote products derived from the
  33.                 Apple Software without specific prior written permission from Apple.  Except as
  34.                 expressly stated in this notice, no other rights or licenses, express or implied,
  35.                 are granted by Apple herein, including but not limited to any patent rights that
  36.                 may be infringed by your derivative works or by other works in which the Apple
  37.                 Software may be incorporated.
  38.  
  39.                 The Apple Software is provided by Apple on an "AS IS" basis.  APPLE MAKES NO
  40.                 WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
  41.                 WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  42.                 PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
  43.                 COMBINATION WITH YOUR PRODUCTS.
  44.  
  45.                 IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
  46.                 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  47.                 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  48.                 ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
  49.                 OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT
  50.                 (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
  51.                 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  52.  
  53. */
  54.  
  55.  
  56. // Usage notes: 
  57.  
  58.  
  59.  
  60. // include control --------------------------------------------------
  61.  
  62. #ifndef Error_Handler_h
  63. #define Error_Handler_h
  64.  
  65.  
  66. // includes ---------------------------------------------------------
  67.  
  68. #include <DrawSprocket.h>
  69.  
  70. #include <agl.h>
  71.  
  72. #ifdef __cplusplus
  73. extern "C" {
  74. #endif
  75.  
  76. // structures (public) -----------------------------------------------
  77.  
  78.  
  79. // public function declarations -------------------------------------
  80.  
  81. // Error reporter, can be set to report however the application desires
  82. void ReportError (char * strError);
  83.  
  84. // Error with numeric code reporter, can be set to report however the application desires
  85. void ReportErrorNum (char * strError, long numError);
  86.  
  87. // Handle reporting of DSp errors, error code is passed through
  88. OSStatus DSpReportError (OSStatus error);
  89.  
  90. // Handle reporting of agl errors, error code is passed through
  91. GLenum aglReportError (void);
  92.  
  93. #ifdef __cplusplus
  94. }
  95. #endif
  96.  
  97. #endif // Error_Handler_h